<template>
    <div id="footer">
        <div class="container">
            <div class="left">
                <div class="item">
                    <div class="title">关于我们</div>
                    <div class="linkbox">
                        <div class="links" v-for="item in about " :key="item.id" @click="ShowUS(item.id)">
                            {{ item.title }}
                        </div>
                       
                    </div>
                </div>
                <div class="item">
                    <div class="title">帮助中心</div>
                    <div class="linkbox">
                        <div class="links">购课指南</div>
                        <div class="links">播放器下载</div>
                        <div class="links">看课指南</div>
                        <div class="links">学习卡使用</div>
                        <div class="links">建议反馈</div>
                    </div>
                </div>
                <div class="item">
                    <div class="title">支付方式</div>
                    <div class="linkbox">
                        <div class="links">在线支付</div>
                        <div class="links">银行汇款</div>
                        
                    </div>
                </div>
            </div>

            <div class="middle">
                <div class="codeitem">
                    <div class="name">官方订阅号</div>
                    <div class="imgbox">
                        
                    </div>
                </div>
                <div class="codeitem">
                    <div class="name">官方服务号</div>
                    <div class="imgbox">
                        
                    </div>
                </div>
            </div>

            <div class="right">
                <div class="telboxs">
                    <div class="icon">
                        <i class="el-icon-phone"></i>
                    </div>
                    <div class="info">
                        <div class="desc">咨询热线</div>
                        <div class="tel">400-000-0000</div>
                    </div>
                </div>
                <div class="telboxs">
                    <div class="icon">
                        <i class="el-icon-phone-outline"></i>
                    </div>
                    <div class="info">
                        <div class="desc">客服热线</div>
                        <div class="tel">400-000-0000</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                links: [],
                about: [],

            }
        },
        mounted () {
           this.getLinks()
           this.getAbout()
        },
        methods: {
            //    获取友情链接
            async getLinks() {
                let res = await this.$axios.post("/port/index/friendship", { key: this.$key })
                // console.log(res);
                this.links = res.data.data
            },
            // 获取关于我们
            async getAbout() {
                let res = await this.$axios.post("/port/index/about", { key: this.$key })
                let code = res.data.code
                // console.log(res);
                
                if (code == 200) {
                    this.about = res.data.data
                }
            },
            // 关于我们内容
            ShowUS( id ) {
                this.$router.push(`/aboutus/${id}`)
            }
        },
    }
</script>

<style lang="scss" scoped>
#footer {
    width: 100%;
    box-sizing: border-box;
    background-color: #000;
    .container {
        width: 1200px;
        box-sizing: border-box;
        margin: 0 auto;
        padding: 20px 0;
        color: #fff;
        display: flex;
        .left {
            display: flex;
            .item {
                width: 190px;
                margin: 0 10px;
                .title {
                    font-size: 24px;
                    font-weight: bold;
                    height: 40px;
                    line-height: 40px;
                    border-bottom: 1px solid #aaa;
                }
                .linkbox {
                    width: 100%;
                    display: flex;
                    flex-wrap: wrap;
                    justify-content: space-between;
                    .links {
                        margin: 10px;
                        cursor: pointer;
                    }
                }
            }
        }
        .middle {
            width: 260px;
            display: flex;
            padding: 10px 30px;
            justify-content: space-between;
            .codeitem {
                width: 100px;
                
                text-align: center;
                display: flex;
                flex-direction: column;
                align-items: center;
                .name {
                    font-size: 18px;
                    height: 30px;
                    line-height: 30px;
                }
                .imgbox {
                    width: 80px;
                    height: 80px;
                    background-color: #fff;
                }
            }
        }
        .right {
            margin-left: 30px;
            .telboxs {
                display: flex;
                align-items: center;
                margin: 20px 0;
                .icon {
                    font-size: 30px;
                    margin-right: 10px;
                }
            }
        }
    }
}
</style>